home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: __argv[0] bug under Win 95?
- Date: 11 Mar 96 11:46:33 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.826544793@rscernix>
- References: <4hr196$1hl@murphy2.servtech.com> <4hvc3kINNeq@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4hvc3kINNeq@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
-
- >In article <4hr196$1hl@murphy2.servtech.com>,
- >Terry Carmen <tpcarmen@servtech.com> wrote:
- > >For some reason __argv[0] is empty under Windows 95, but contains the program name
- >
- >__argv is not part of the C standard.
- >
- >
- > >and path as it should under Win 3.1x and Win NT.
- > >
- > >Does anybody have any idea why, or how I can obtain the name of the currently
- > >executing (16 bit) app under Win 95?
- >
- >A C program can determine its name by looking at the string argv[0], assuming
- >that you have defined your main as ``int main(int argc, char *argv[])''.
- >On systems where the program name is not available, argv[0][0] is zero.
-
- Unless argv[0] is NULL.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-